import { axios, server } from '../config';
export const getCity = () => {
  return axios.get('/api/city.json');
};
export const getCode = params => {
  return server({
    method: 'get',
    url: '/sms/ajax.php',
    params: Object.assign(params, {
      action: 'send_sms'
    })
  });
};
export const login = data => {
  return server({
    method: 'post',
    url: '/captcha/login.php',
    data
  });
};
export const checkLogin = function() {
  return server({
    method: 'post',
    url: '/captcha/login_vf.php'
  });
};

export const changeUserImg = function(data) {
  return server({
    method: 'post',
    url: '/img/upImg.php',
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    data
  });
};
